/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package model;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author thedaego
 */
public class DataLocator {
    private String locatorName;
    private String xpath;
    private URL locatorUrl;

    public DataLocator(String name, String xpath, String locatorUrl) throws MalformedURLException {
        this.locatorName = name;
        this.xpath = xpath;
        this.locatorUrl = new URL(locatorUrl);
    }

    DataLocator() {
        super();
    }

    public String getLocatorName() {
        return locatorName;
    }

    public void setLocatorName(String locatorName) {
        this.locatorName = locatorName;
    }

    public URL getLocatorUrl() {
        return this.locatorUrl;
    }

    public void setLocatorUrl(String locatorUrl){
        try {
            this.locatorUrl = new URL(locatorUrl);
        } catch (MalformedURLException ex) {
            Logger.getLogger(DataLocator.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public String getXpath() {
        return xpath;
    }

    public void setXpath(String xpath) {
        this.xpath = xpath;
    }



}
